<?php

class Service_Form_Loan extends Custom_Form
{

	function  __construct() {
		parent::__construct(null);
	}

	public function init()
    {
        $translate = Zend_Registry::get('translate');
		$this->setTranslator($translate);

        $objDistrict = new Service_Model_DbTable_District();
		$this->setName("frmLoan");
        $this->setMethod('post');

        $this->addElement('text', 'amount', array(
            'filters'    => array('StringTrim'),
            'validators' => array(
                array('StringLength', false, array(0, 50))
			),
            'required'   => true,
            'label'      => __('Loan Amount').':',
        ));

        $this->addElement('text', 'date', array(
            'filters'    => array('StringTrim'),
            'validators' => array(
                array('StringLength', false, array(0, 15))
			),
            'required'   => true,
            'label'      => __('Date of Withdrawal').':',
        ));

        $this->addElement('text', 'security', array(
            'filters'    => array('StringTrim'),
            'validators' => array(
                array('StringLength', false, array(0, 15))
			),
            'label'      => __('Collateral').':',
        ));

        $this->addElement('text', 'recommender_name', array(
            'filters'    => array('StringTrim'),
            'validators' => array(
                array('StringLength', false, array(0, 15))
			),
            'required' => true,
            'label'      => __('Name of the recommender').':',
        ));

        $this->addElement('text', 'recommender_citizenship_no', array(
            'filters'    => array('StringTrim'),
            'validators' => array(
                array('StringLength', false, array(0, 15))
			),
            'required'   => true,
            'label'      => __('Citizenship of the recommender').':',
        ));

        $this->addElement('text', 'recommender_passport', array(
            'filters'    => array('StringTrim'),
            'validators' => array(
                array('StringLength', false, array(0, 15))
			),
            'label'      => __('Passport No').':',
        ));

        $this->addElement('button', 'save', array(
            'required' => false,
            'ignore'   => true,
            'id'   => "loanBtn",
            'label'    => __('Save'),
        ));

		$this->save->removeDecorator('label');
	}
}